package org.bozo.im.service.protocols.xmpp.stanza.util.sasl;

import java.util.Hashtable;

public class Mechanisms {

	private static Hashtable<String, Mechanism> mMechanisms;
	
	static {
		mMechanisms = new Hashtable<String, Mechanism>();
		addMechanism(new PlainMechanism());
		addMechanism(new MD5Mechanism());
	}
	
	private static void addMechanism(Mechanism pMechanism) {
		mMechanisms.put(pMechanism.getName(), pMechanism);
	}
	
	public static Mechanism getMechanism(String pName) {
		return mMechanisms.get(pName);
	}
}
